﻿using System.Windows.Media;

namespace Red.Toolkit.Profiler.Logic
{
    /// <summary>
    /// Structure allowing for color customization pew view
    /// </summary>
    public class ProfilerViewStyle
    {
        const int MaxBlockTypes = 256;

        public double BlockHeight;
        public Color[] BlockColors;

        public ProfilerViewStyle()
        {
            BlockHeight = 20;
            BlockColors = new Color[MaxBlockTypes];

            for ( int i = 0; i < BlockColors.Length; ++i )
                BlockColors[i] = Color.FromArgb( 255, 100, 100, 100 );
        }

        public void SetColor( int type, Color barColor )
        {
            if ( type < BlockColors.Length && type >= 0 )
                BlockColors[type] = barColor;
        }
    }
}
